Getting Intermittent SecurityException "Request for the permission of type 'System.Security.Permissions.Secur ityPermission, mscorlib...' failed"
We are hosting a website on a SharePoint Farm (MOSS 2007). When we use SharePoint Search, we have the results but sometimes we get a SecurityException (using the same query)... Once we get this exception, all the next queries failed with a SecurityException until we recycle the AppPool. Here is the stack trace: Server Error in '/' Application. -------------------------------------------------------------------------------- Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: Server Error in '/' Application. -------------------------------------------------------------------------------- Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] <CrtImplementationDetails>.RegisterModuleUninitializer(EventHandler ) +0 <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* ) +984 <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) +172 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3620; ASP.NET Version:2.0.50727.3618
July 5th, 2011 1:24pm

Hi, According to your description, please try this: <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" /> Of course, it's less secure... but give that a whirl to see if it works, and THEN focus on locking it down to the correct directory. Best Regards David Hu
Free Windows Admin Tool Kit Click here and download it now
July 6th, 2011 9:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics